<?php

        global $_GPC, $_W;
        $rid = intval($_GPC['rid']);

        $uniacid = $_W['uniacid'];


        $countId  = $_GPC['countId'];

        $reply = pdo_fetch("SELECT * FROM ".tablename('haoman_dpm_countmoneyreply')." WHERE rid=:rid",array(':rid'=>$rid));

        $_r = $_GPC['_r'];



        $times = empty($reply['countmoney_time'])?100:$reply['countmoney_time'];

        $Counts = pdo_fetchall("SELECT * FROM " . tablename('haoman_dpm_countmoneyuser') . " WHERE pici = :pici and  rid = " . $rid . " and uniacid=" . $uniacid . " order by `count` desc LIMIT 13",array(':pici'=>$countId));

        //        $Counts = array(
        //            'FansId' => 123,
        //            'NickName' => '隔壁老王',
        //            'Head' => "http://file.kxdpm.com/FansAvatar/201710/Weixin_gh_d1585d3fbecb/otKnzsxKjT4x-cohIBNA98WS0L-8.jpg",
        //            'Count' => 5,
        //        );
       if($reply['status']==2){
           $data = array(
               'IsOver' => true,
               'Counts' => $Counts,
           );
       }else{
           $data = array(
               'IsOver' => false,
               'Counts' => $Counts,
           );
       }



        echo json_encode($data);